(function () {



  let obj = {
    name: 'ldd',
    age: 18
  }


  for (let key in obj) {
    Object.defineProperty(obj, key, {
      get() {
        console.log('defineProperty---get')
        return obj[key]
      },
      set(value) {
        console.log('defineProperty---set')
        obj[key] = value
      }
    })
  }

  // obj.name = 'liudandan'

  // console.log(obj.name);

})()


